package com.dream.cgomall.dao;

import com.dream.cgomall.entity.CgoCommentimage;
import com.dream.cgomall.entity.CgoGoodEvaluate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CgoGoodEvaluateDao {
    //商品的评论数量
    Integer findEvalCount(Integer id);
    //通过商品ID查询该商品的所有评论
    List<CgoGoodEvaluate> findEvalById(Integer id);
    //通过评论id查询评论图片
    @Select("select * from cgo_commentimage where evaluate_id = #{id}")
    List<CgoCommentimage> findCommentImageById(Integer id);
}
